<?php
class Zend_View_Helper_showTableSalebill {

    public function showTableSalebill($view) {
        
        $arrSalebill = $view->arrSalebill; 
        $strHtml = '';
        $strHtml .= '<table class="hovertable">';
        $strHtml .= '<tr>';
        $strHtml .= '<th>Người lập</th>';
        $strHtml .= '<th>Khách hàng</th>';
        $strHtml .= '<th>Ngày lập</th>';
        $strHtml .= '<th>Tổng hóa đơn</th>';
        $strHtml .= '<th>Thao tác</th>';
        $strHtml .= '</tr>';
        if(isset($arrSalebill))
        foreach ($arrSalebill as $salebill) {
            
            $strHtml .= '<tr id="tablerow">';
            $strHtml .= '<td> <a href="'.$view->baseUrl().'/salebill/detail/id/'.$salebill->salebill_id.'">'. $salebill->user_id_employee. '</a></td>';
            $strHtml .= '<td>'. $salebill->user_id_customer.'</td>';
            $strHtml .= '<td>'. $salebill->salebill_date_created.'</td>';
            $strHtml .= '<td>'. $salebill->salebill_total.'</td>';
            $strHtml .= '<td><a class="icon-1" href="'.$view->baseUrl().'/salebill/edit/id/'.$salebill->salebill_id.'"/>
                             <a class="icon-2" href="'.$view->baseUrl().'/salebill/delete/id/'.$salebill->salebill_id.'"/></td>';
            $strHtml .= '</tr>';
        }
        
        $strHtml .= '</table>';
        return $strHtml ;
    }
}